-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add first login timestamp of each user to oc_preferences and user:info output #49377
base: master
Are you sure you want to change the base?
Conversation
eb486cc
to
fd366a6
Compare
I now store -1 for users which have already logged in before upgrade to 31, and show that as "unknown" in user:info output. |
fd366a6
to
f8c42b7
Compare
core/Command/User/Info.php
Outdated
@@ -56,7 +72,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |||
'groups' => $groups, | |||
'quota' => $user->getQuota(), | |||
'storage' => $this->getStorageInfo($user), | |||
'last_seen' => date(\DateTimeInterface::ATOM, $user->getLastLogin()), // ISO-8601 | |||
'first_seen' => $firstSeen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked user:info first_seen
and looks good 👍
Can we also show this in user:list --info
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
But I’m remembering now that last time a PR tried to show never for last_seen @nickvergessen objected that this was a breaking change.
So not sure what is the best way ahead here. It is not appropriate to show fake timestamp for never/unknown, on the other hand scripts need to be aware of it.
Maybe we simply note this as a breaking change and still merge the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Tested, thanks 🙏
/compile / |
159276f
to
f102154
Compare
f00a83d
to
99ba7d3
Compare
…er:info output Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
…urrent date Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Also format unknown and never in a better way. Signed-off-by: Côme Chilliet <[email protected]>
Co-authored-by: Joas Schilling <[email protected]> Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
6a68788
to
8f05db4
Compare
See #22640
Close #48649
Summary
Add First login information in the user settings, as is done for last login
Checklist